// your code goes here
'use strict';

var React = require('react-native');
var MOCKED_MOVIES_DATA=[
{
	title:'Title',
	year:'2015',
	posters:{
		thumbnail:'http://i.imgur.com/UePbdph.jpg'
	}
},
];
var { 
	View ,
	Text,
	Image,
	
} = React;
var styles = React.StyleSheet.create({
	Container: {
		flex: 1,
		flexDirection: 'row',
		justifyContent:'center',
		alignItems: 'center',
		backgroundColor: '#CCCCCC'
	},
	rightContainer:{
		flex: 1,
	},
	thumbnail:{
		width: 53,
		height: 81
	},
	title:{
		fontSize: 20,
		marginBottom:8,
		textAlign:'center',
	},
	year:{
		textAlign:'center',
	},
});

class PropertyFinderApp extends React.Component {
  render() {
	var movie = MOCKED_MOVIES_DATA[0];
	return(
		<View style={styles.Container}>
			<Image source={{uri:movie.posters.thumbnail}}
				style={styles.thumbnail}
			/>
			<View style={styles.rightContainer} >
				<Text style={styles.title} >
					{movie.title}
				</Text>
				<Text style={styles.year}>
					{movie.year}
				</Text>
			</View>
		</View>
	);
//     return React.createElement(React.View, {style: styles.welcome},
// 		<Text>Hello World!</Text>
// 	);
  }
}

React.AppRegistry.registerComponent('PropertyFinderApp',() => PropertyFinderApp);